package persistence;

import core.exception.SaveException;

/**
 * Manages transactions for the data persistence
 * @author Sabrina
 *
 */
public interface TransactionManager 
{
	/**
	 * Begins a transaction based on the type of data persistence
	 * @throws Exception if problem beginning the transaction
	 */
	abstract void beginTransaction() throws SaveException;

	/**
	 * Ends the transaction based on the type of data persistence
	 * @param commit true if changes should be made permanent
	 * 		false if changes should be reverted
	 * @throws Exception thrown if problem ending transaction
	 */
	abstract void endTransaction(boolean commit) throws SaveException;
}
